﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ClassLibrary;

namespace Program
{
    public partial class Main : System.Web.UI.Page
    { 
        PatientCollection patient = new PatientCollection();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void BtnAddPatient_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/AddPatient.aspx");
        }

        protected void BtnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                TbxFoundPatient.Text = patient.SearchPatient(TbxSearchPatient.Text).Name;
            }
            catch (System.NullReferenceException)
            {
                TbxFoundPatient.Text = "Null";
            }
        }

        protected void BtnAddContent_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/UploadNewContent.aspx");
        }
    }
}